package com.androidified.personalshopper.model;

import java.util.List;

import com.androidified.personalshopper.Constants;
import com.androidified.personalshopper.bean.Commerce;
import com.androidified.personalshopper.bean.PromotionsResponse;
import com.androidified.personalshopper.client.PromotionService;

public class PromotionModel {

	public static List<Commerce> getAll(List<Commerce> commerces) {
		for (Commerce commerce : commerces) {
			PromotionsResponse pr = PromotionService.get(Constants.API_KEY, Constants.TEST_TOKEN, commerce);
			commerce.setPromotions(pr.getData());
		}
		return commerces;
	}
}
